<?$count=count($this->rubrics);
  $k=intval($count/7);
 if (($k==2)&&($count%7>0)){$id='two';}
 else {$id='one';}
?>
<div class="podmenu" id="<?=$id?>">
    <ul class="nav nav-pills">

        <?for ($i=0;$i<7;$i++):?>
        <li>
            <a href="/index/rubric/id/<?=$this->rubrics[$i]['id']?>">
                            <?=$this->rubrics[$i]['name']?>
                        </a>
        </li>
         <?endfor?>
        <input type="button" class="btn arrows" value=""  title="More rubric">
    </ul>
</div>

<?function newul($nachalo, $konec, $rubrics){?>
        <div class="podmenu" >
           <ul class="nav nav-pills">

               <?for ($i=$nachalo;$i<$konec;$i++):?>
               <li>
                   <a href="/index/rubric/id/<?$rubrics[$i]['id']?>">
                       <?=$rubrics[$i]['name']?>
                   </a>
               </li>
                <?endfor?>
          </ul>
       </div>
    <?}?>

    <?if ($count>7) {print "<div class='novisible'>";newul(7,14,$this->rubrics);?>
    <?if ($count>14) newul(14,$count,$this->rubrics); print "</div>";}?>




